/**
* Class Name: iFulfillProductSearchControllerTest
* Author: Accenture
* Date:  8/4/2011 
* Requirement/Project Name: iFulfill
* Requirement/Project Description: Test class for iFulfillProductSearchController
**/

@isTest

private class iFulfillProductSearchControllerTest
{
    /*
     *  Test method.
     *
     **/
    static testMethod void test_Search()
    {
        Product2 prod = new Product2();
        PageReference pageRef = Page.iFulfillAddProducts;
        Test.setCurrentPage(pageRef);
        ApexPages.StandardController ctrl = new ApexPages.StandardController(prod);
        iFulfillProductSearchController controller = new iFulfillProductSearchController(ctrl);
        
        Fulfillment_Product_Group__c fpg = new Fulfillment_Product_Group__c();
        fpg.name = 'FPG';
        fpg.Product_Group_Code__c = '001AAADG';
        insert fpg;
        
        Fulfillment_Products__c fP= new Fulfillment_Products__c();
        fP.Feature__c = 'AB11';
        fP.Package__c = True;
        fP.Product_External_ID__c = 'B2011ACC';
        fP.Product_Family__c = 'Audio';
        fP.Product_UDAC_Code__c = '001';
        fP.Status__c = 'Active';
        fP.Fulfillment_Product_Group__c = fpg.id;
        Insert fP;
               
        controller.doCancel();
        controller.doSearch();
        controller.previous();
        controller.next();
        controller.getSelectedElements();
        controller.doSelect();
        controller.doSearch();
        controller.getTotalNoOfRecord(); 
        controller.getHasNext();
        controller.getHasPrevious();
        controller.getStatus();
        controller.getProductFamilyName();
    }
}